package com.example.blogback.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.Contact;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * OpenAPI文档配置类
 * 用于配置API文档的基本信息和安全配置
 */
@Configuration
public class OpenApiConfig {

    /**
     * 配置OpenAPI文档信息
     * @return OpenAPI配置实例
     */
    @Bean
    public OpenAPI springOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("博客系统API文档")
                        .description("博客系统后端接口文档")
                        .version("v1.0.0")
                        .contact(new Contact()
                                .name("开发团队")
                                .email("support@example.com")));
    }
}